package org.nanotek.cms.domain.base;

import org.nanotek.AbstractBase;
import org.nanotek.Base;
import org.nanotek.Kong;

@SuppressWarnings({"serial"})
public class KongIdentity<I extends Base<?>> extends AbstractBase<I> implements Kong <I>{

    private I kong;

//    public KongIdentity(Kong<String> string){
//    	this.kong = string;
//    }

    public KongIdentity() {}
    
	public KongIdentity(I string) {

		this.kong = string;
	}


	public void setId(I id)
    {
    	this.kong = id;
    }


	@Override
	public I getId() {
		return kong;
	}


	@Override
	public I get() {
		return kong;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((kong == null) ? 0 : kong.hashCode());
		return result;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		KongIdentity other = (KongIdentity) obj;
		if (kong == null) {
			if (other.kong != null)
				return false;
		} else if (!kong.equals(other.kong))
			return false;
		return true;
	}

}
